#!/bin/bash

purge_packages || exit 1

rm_external_repo "adoptium"

echo "Deleting /opt/pycharm-community directory"
sudo rm -rf /opt/pycharm-community || error "Failed to delete /opt/pycharm-community directory"
sudo rm -f ~/.local/share/applications/jetbrains-pycharm-ce.desktop /usr/local/share/applications/jetbrains-pycharm-ce.desktop
# cleanup files leftover from potential failed install
rm -rf $HOME/pycharm-community.tar.gz $HOME/pty4j $HOME/fsnotifier-pycharm-rpi  $HOME/fsnotifier-pycharm-rpi.zip
